﻿$dt.profile.exam = function () {
    this.getDetailPage = function (args) {
        $dt.getPage({
            url: '/userProfile/ExamDetails/' + args.id,
            loaded: function (html) {
                var target = $(args.container);
                var view = $(html);
                target.append(view);
                args.loadComplete(view);
            }
        });
    }
}
$(document).ready(function () {
    var p = new $dt.profile.exam();
    $('#exams-table a').click(function (e) {
        var $a = $(this);
        $('div.details-panel').remove();
        p.getDetailPage({
            id: 1,
            container: '#page-panel',
            loadComplete: function (view) {
                $.scrollTo(view, 1500, { easing: 'linear' });
                var h = view.find('td.links-panel').height();
                view.find('iframe').height(h);
            }
        });
        return false;
    });
});